package com.atcc.test.common;

public enum ErrorCodeEnum {
	/**请求成功 */
	CODE_SUCCESS("200", "success"),
	/**业务异常 */
	
	NOPHONE_ERROR("20001","该手机号未注册"),
	
	HASPHONE_ERROR("20002","该手机号已注册"),
	
	SENDMSG_ERROR("20003","短信发送失败"),
	
	DXYZM_ERROR("20004","验证码错误或失效"),
	
	LOGIN_ERROR("20005","账号或密码错误"),
	
	REGISTER_ERROR("20006","注册失败"),
	
	OPERATION_ERROR("20007","操作失败"),
	
	OPERATION_CYCLE("20008","重复操作"),
	
	UPLOAD_ERROR("20009","图片上传失败"),
	
	UPLOAD_EMPTY("20010","图片为空，请重新上传"),
	
	UPLOAD_OVERSIZE("20011","图片文件大小超过最大允许文件大小"),
	
	UPLOAD_TYPEERROR("20012","上传图片类型不正确"),
	
	OLDPWD_ERROR("20013","原密码错误"),
	
	USERFORBID_ERROR("20014","您的账号被禁用，请联系管理员"),
	
	ADMINLOGIN_ERROR("20015","该用户不是镇及以上管理员"),
	//获取图片
	PHOTO_NOT_FOUND("20016","图片未找到"),
	
	AUTHORITY_ERROR("40101","权限不足"),
	
	QUERY_EMPTY("40401","查询结果为空"),
	
	/**请求异常 */
	REQUEST_TIMEOUT("40801", "请求超时"),

	LOGIN_TIMEOUT("40802","token失效，用户未登录或登录超时"),
	
    PARAM_EMPTY("40001", "必选参数为空"),

    PARAM_ERROR("40002", "参数格式错误"),
    

    AUTHLEVEL_ADD_ERROR("50001","没有权限添加权限级别"),
    
    AUTHLEVEL_EXIST_ERROR("500010","权限级别已存在"),
    
    AUTHLEVEL_GET_ERROR("50002","没有权限获取权限级别"),
    
    AUTHLEVEL_DELETE_ERROR("50003","没有权限删除权限级别"),
    
    DEPARTMENT_ADD_ERROR("50004","没有权限添加机关单位"),
    
    DEPARTMENT_EXIST_ERROR("500040","机关单位已存在"),
    
    DEPARTMENT_GET_ERROR("50005","没有权限获取机关单位"),
    
    DEPARTMENT_DELETE_ERROR("50006","没有权限删除机关单位"),
    
    DEPARTMENT_UPDATE_ERROR("50007","没有权限更新机关单位"),
    
    DEPARTMENT_SURVEYTYPE_ADD_ERROR("50008","没有权限添加机关单位和监测类型的关系"),
    
    DEPARTMENT_SURVEYTYPE_EXIST_ERROR("500080","机关单位和监测类型的关系已存在"),
    
    DEPARTMENT_SURVEYTYPE_GET_ERROR("50009","没有权限获取机关单位和监测类型的关系列表"),
    
    DEPARTMENT_SURVEYTYPE_DELETE_ERROR("50010","没有权限删除机关单位和监测类型的关系"),
    
    DEPARTMENT_SURVEYTYPE_UPDATE_ERROR("50011","没有权限更新机关单位和监测类型的关系"),
    
    SURVEYTYPE_ADD_ERROR("50015","监测类型已经存在,不能添加添加监测类型"),
    
    SURVEYTYPE_EXIST_ERROR("500150","监测类型已存在"),
    
    SURVEYTYPE_GET_ERROR("50016","没有权限获取监测类型列表"),
    
    SURVEYTYPE_DELETE_ERROR("50017","没有权限删除监测类型"),
    
    SURVEYTYPE_UPDATE_ERROR("50018","监测类型不存在,不能更新监测类型"),
    
    ROLE_ADD_ERROR("50012","没有权限添加角色"),
    
    ROLE_EXIST_ERROR("500120","角色已存在"),
    
    ROLE_GET_ERROR("50013","没有权限获取角色"),
    
    ROLE_DELETE_ERROR("50014","没有权限删除角色"),
    
    ROLE_UPDATE_ERROR("50015","没有权限更新角色"),
    
    USER_ADD_ERROR("50019","没有权限添加用户"),
    
    USER_PARAM_ERROR("500191","用户参数不能为空,请核查"),
    
    USER_GET_ERROR("50020","没有权限获取用户"),
    
    USER_DELETE_ERROR("50021","没有权限删除用户"),
    
    USER_UPDATE_ERROR("50022","没有权限更新用户"),
    
    BATCH_IMAGE_EXIST_ERROR("500230","批次与影像服务的关系信息已存在"),
    
    BATCH_IMAGE_ADD_ERROR("50023","没有权限添加批次与影像服务的关系信息"),
    
    BATCH_IMAGE_GET_ERROR("50024","没有权限获取批次与影像服务的关系信息"),
    
    BATCH_IMAGE_DELETE_ERROR("50025","没有权限删除批次与影像服务的关系信息"),
    
    BATCH_IMAGE_UPDATE_ERROR("50026","没有权限更新批次与影像服务的关系信息"),
    
    MODULE_EXIST_ERROR("500270","模块已存在"),
    
    ROLESURVEYTYPE_ADD_ERROR("50028","没有权限添加角色与监测类型的关系"),
    
    ROLESURVEYTYPE_EXIST_ERROR("500280","角色与监测类型的关系已存在"),
    
    ROLESURVEYTYPE_GET_ERROR("50029","没有权限获取角色与监测类型的关系列表"),
    
    ROLESURVEYTYPE_DELETE_ERROR("50030","没有权限删除角色与监测类型的关系"),
    
    ROLESURVEYTYPE_UPDATE_ERROR("50031","没有权限更新角色与监测类型的关系"),

	UNKNOWN_ERROR("99999", "系统繁忙，请稍后再试....");
	
	private String code;

	private String desc;

	ErrorCodeEnum(String code, String desc) {
	        this.code = code;
	        this.desc = desc;
	    }

	public String getCode() {
	        return this.code;
	    }

	public String getDesc() {
	        return desc;
	    }
	 
	@Override
	public String toString() {
	        return "[" + this.code + "]" + this.desc;
	    }

	}


